/*
  Jeffrey Minton
  conection.h
  Conection class: responsible for all serial comunication
  sends and recieves data to anf from the robot
  This class should not be used unless you know the correct robot commands
  use the controller class to send commands
*/

#ifndef CONNECTION_H
#define CONNECTION_H

#include "QString"
#include "QMessageBox"
#include "windows.h"
#include <string>
#include <iostream>

class Connection
{
public:
    Connection();//constructor

    //create a serial connection to the robot
    bool connect(QString port);

    //send a comand to the robot
    bool send(std::string command);

    //read a signal back from the robot
    std::string read();

private:
    HANDLE hSerial;//serial file
    QMessageBox alert;

};

#endif // CONNECT_H
